<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import AfterSaleStatusEnum from '@/feature/oms/infra/constants/AfterSaleStatusEnum'
import { orderItemApi } from '@/feature/oms/infra/api/orderItemApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: { CURDTable },
  data() {
    return {
      option: {
        requestApi: orderItemApi,
        columns: [
          {
            label: '订单ID',
            prop: 'orderId',
            searchable: true,
            type: ColumnType.SELECT
          },
          {
            label: 'SpuID',
            prop: 'spuId',
            type: ColumnType.SELECT
          },
          {
            label: 'SkuID',
            prop: 'skuId',
            type: ColumnType.SELECT
          },
          {
            label: '销售价格',
            prop: 'skuPrice'
          },
          {
            label: '销售数量',
            prop: 'skuNum',
            type: ColumnType.NUMBER
          },
          {
            label: 'sku封面',
            prop: 'skuImg'
          },
          {
            label: '商品名称',
            prop: 'spuTitle'
          },
          {
            label: '销售属性，逗号隔开',
            prop: 'salePropValues'
          },
          {
            label: '实际金额',
            prop: 'realAmount'
          },
          {
            label: '售后状态',
            prop: 'afterSaleStatus',
            type: ColumnType.SELECT,
            options: AfterSaleStatusEnum
          },
          {
            label: '商品服务',
            prop: 'serviceIds'
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

